﻿using System.Data.Entity.ModelConfiguration;
using ProjetoComperio.DataLayer.Entities;

namespace ProjetoComperio.DataLayer.Configuration
{
    public class ContributionItemConfiguration : EntityConfiguration<ContributionItem>
    {
        public ContributionItemConfiguration()
        {
            Property(contributionItem => contributionItem.ContributionItemID).IsIdentity();
            MapSingleType(
               contributionItem => new
               {
                   contributionItem.ContributionID,
                   contributionItem.FileName,
                   contributionItem.FileUrl,
                   contributionItem.UploadDate,
                   contributionItem.UserName,
                   contributionItem.ContributionItemID
               }).ToTable("ContributionItem");
        }
    }
}
